import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './registerServiceWorker'
import moment from 'moment'
import axios from '../utils/axios.js'
import { NavBar } from "vant";
import { Dialog } from 'vant';

Vue.use(Dialog);
Vue.use(NavBar);
import {
  post,
  get
} from '../utils/http.js'
import {
  formatNum
} from '../utils/format.js';
Vue.config.productionTip = false
Vue.prototype.$axios = axios
Vue.prototype.$post = post
Vue.prototype.$get = get
Vue.filter("formatNum", formatNum);
Vue.filter('formatData', function (dataStr, pattern = 'YYYY-MM-DD HH:mm:ss') {
  return moment(dataStr).format(pattern)
})
Vue.prototype.$moment = moment

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
